
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>操作当当购物车页面</title>
    <link type="text/css" rel="stylesheet" href="cartStyle.css" />
	<script>
		function a1(){
			if(window.confirm("真的要关闭？"))
								window.close();
							else{
								alert("您放弃了关闭");
							}
						}
		function ab(){
			document.getElementById('b1').innerHTML='¥45.90元';
		}
		function a3(str){
			if(window.confirm("真的要删除？"))
								self(str);
							else{
								alert("您放弃了删除");
							}
						}
		function self(str){
			var mbox = document.querySelector(str);
			if (mbox) {
				mbox.parentNode.removeChild(mbox);
			}
		}
		function collection(){
			alert("收藏成功");
		}
	</script>
</head>
<body>

<div class="content">
    <div class="logo">
        <img src="dd_logo.jpg"><span onclick="a1()">关 闭</span>
    </div>
    <div class="cartList" id="cartList">
        <ul>
            <li>商品图片</li>
            <li>商品信息</li>
            <li>单价</li>
            <li>数量</li>
            <li>总价</li>
            <li>操作</li>
        </ul>
        <ul class="box">
            <li><img src="dog.jpg"></li>
            <li>我和狗狗活下来了</li>
            <li>¥<input type="text" name="price" value="21.90"></li>
            <li><input type="button" name="minus" value="-" onclick=""><input type="text" name="amount" value="1"><input type="button" name="plus" value="+" onclick=""></li>
            <li id="price0">¥21.90</li>
            <li><p  onclick="collection();">移入收藏</p><p onclick="a3('.box')">删除</p></li>
        </ul>
        <ul class="boxa">
            <li><img src="mai.jpg"></li>
            <li>灰霾来了怎么办</li>
            <li>¥<input type="text" name="price" value="24.00"></li>
            <li><input type="button" name="minus" value="-" onclick=""><input type="text" name="amount" value="1"><input type="button" name="plus" value="+" onclick=""></li>
            <li id="price1">¥24.00</li>
            <li><p onclick="collection();">移入收藏</p><p onclick="a3('.boxa')">删除</p></li>
        </ul>
        <ol>
            <li id="totalPrice">商品总计：<span id="b1"></span></li>
            <li><span onclick="ab()">结 算</span></li>
       </ol>
    </div>
</div>
</body>
</html>